﻿<Window x:Class="CPPEI.Coolzon.UI.XProperty.Editors.ResourceFileEditWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.UI.XProperty.Editors"
        xmlns:runtime="clr-namespace:CPPEI.Coolzon.Designtime"
        mc:Ignorable="d"
        Title="资源选择" Height="400" Width="500" Topmost="True" ShowInTaskbar="False" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen"
        Style="{DynamicResource WindowStyle}">
    <Grid x:Name="gdImage" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition Width="auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Text="图片资源：" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
        <Grid  Grid.Column="1" Grid.Row="0" >
            <ComboBox x:Name="cbPicName" SelectionChanged="cbPicName_SelectionChanged" >
                <ComboBox.ItemTemplate>
                    <HierarchicalDataTemplate DataType="{x:Type runtime:ImageRes}" >
                        <TextBlock Text="{Binding Name}"/>
                    </HierarchicalDataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </Grid>
        <Button Style="{DynamicResource  ShortButtonStyle}" Grid.Row="0" Grid.Column="2" x:Name="_ctlClear" Content="清空" Margin="5,0,5,0" Click="_ctlClear_Click"/>
        <MediaElement Grid.ColumnSpan="3" Grid.Row="1" x:Name="_ctlPreview"  HorizontalAlignment="Center" VerticalAlignment="Center"  Stretch="Fill" MinHeight="200" MinWidth="400" Margin="3" LoadedBehavior="Manual"  >
        </MediaElement>

        <StackPanel Grid.Row="3" Grid.ColumnSpan="3">
            <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Content="提 交" Name="_ctlBtnOK" Click="_ctlBtnOK_Click_1" Margin="10,0,10,0" />
        </StackPanel>
    </Grid>
</Window>
